<?php

// Define the charset at utf8
header('charset=utf-8');

// Some defined values
define('SITE_NAME', 'AGILE FACE');
define('SITE_FOLDER', $_SERVER['HTTP_HOST'] . "/");

require_once 'Models/BDD.php';
require_once 'Models/ClassUtilisateur.php';
// Display all errors :)
error_reporting(E_ALL);

// Initiating the Session
session_start();

$oUser = null;
if (isset($_SESSION['user_id'])) {

    $oUser = ClassUtilisateur::GetUtilisateurByID($_SESSION['user_id']);

    if ($oUser == null) {
        $_SESSION = array();
        session_destroy();
        header('location: index.php');
        exit();
    }
}


?>